﻿using Iworld.Author.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Iworld.Author.Service.Client.Export
{
    /// <summary>
    /// 赠送金币记录
    /// </summary>
    [DataContract]
    public class GiveGoldsRecordExport
    {
        /// <summary>
        /// 赠送给的账号
        /// </summary>
        [DataMember]
        public string ToAccount { set; get; }

        /// <summary>
        /// 赠送的用户名
        /// </summary>
        [DataMember]
        public string ToUsername { set; get; }

        /// <summary>
        /// 赠送时间
        /// </summary>
        [DataMember]
        public DateTime GiveTime { set; get; }

        /// <summary>
        /// 赠送的数量
        /// </summary>
        [DataMember]
        public double Golds { set; get; }

        public GiveGoldsRecordExport(GiveGoldsRecord record)
        {
            this.ToAccount = record.To.Account;
            this.ToUsername = record.To.Username;
            this.GiveTime = record.CreatedTime;
            this.Golds = record.Golds;
        }
    }
}
